package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Comment;
import cn.wolfcode.trip.base.query.QueryObject;
import java.util.List;

public interface CommentMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Comment record);

    Comment selectByPrimaryKey(Long id);

    List<Comment> selectAll();

    int updateByPrimaryKey(Comment record);

    /**
     * 根据用户的id把未读为已读
     * @param qo
     */
    void changeStateByUserId(Long qo);

    /**
     * 获取某个用户的某条评论
     * @param qo
     * @return
     */
    Comment getCommentByUserIdAndType(QueryObject qo);

    List<Comment> getByStrategyInfo(QueryObject qo);
}